<template>
  <div class="my">
    <h3>{{title}}</h3>
    <p>{{sum}}</p>
    <button @click="fn">点我</button>
  </div>
</template>

<script>
export default {
 props:['title','sum','id'],
  methods: {
    fn() {
      this.$emit('kan',this.id)
    }
  },
};
</script>

<style>
.my{
  width: 400px;
  padding: 20px;
  border: 2px solid #000;
  border-radius: 5px;
  margin: 10px;
}
</style>